package com.example.ddz.framework;

/**
 * Created by IntelliJ IDEA.
 * User: Marcel Melzig
 * Date: 19.07.11
 * Time: 20:22
 */

import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

/**
 * @author Marcel Melzig
 * @version 0.0.1
 */
public interface IFileIO
{
    /**
     * Returns an input stream of an asset.
     *
     * @param fileName The path of the asset.
     * @return A stream of the asset.
     * @throws IOException An IO error.
     */
    public InputStream ReadAsset(String fileName) throws IOException;

    /**
     * Returns a stream of a file on the external storage.
     *
     * @param fileName The path of a file on the external storage.
     * @return A stream of a file on the external storage.
     * @throws IOException An IO error.
     */
    public InputStream ReadFile(String fileName) throws IOException;

    /**
     * Writes a stream onto the external storage.
     *
     * @param fileName A path on the external storage.
     * @return Returns a output stream onto the external storage.
     * @throws IOException An IO Error.
     */
    public OutputStream WriteFile(String fileName) throws IOException;

}
